<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 	xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:p="http://primefaces.org/ui"
		xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head></h:head>

	<h:body>
        
        <div id="logoHomePage" align="left">
			<a href="homepage.xhtml"><img src="grafica\TravelDream_Logo.gif" width="150" height="75"/></a>
		</div>
		
		<div id="logout" align="right">
        	<h:form>
        	 <a href="users\index.xhtml">Pagina Personale</a>
        	
				<h:commandButton action="#{logoutBean.logout}" value="Logout" />
			</h:form>
		</div>

		
		<div id="formNuovoPacchetto">

			<h:form>
				<p:panel header="Personalizza Pacchetto">

       				<h2></h2>
					<p:selectOneMenu id="alberghi" value="#{pacchettoBean.nuovoPacchetto.albergo}" var="a" converter="#{converterBean}">
						
						<f:selectItem itemLabel="Seleziona Albergo" itemValue=""></f:selectItem>
						<f:selectItems value="#{prodottoBaseBean.alberghiDTO}" var="alberghi" itemLabel="#{alberghi.nome}" itemValue="#{alberghi}"></f:selectItems>
				
							<p:column>
								#{a.nome}
							</p:column>
							<p:column>
								#{a.citta}
							</p:column>
							<p:column>
								#{a.indirizzo}
							</p:column>
							<p:column>
								#{a.stelle}
							</p:column>	
											
					</p:selectOneMenu>
       
					<h2></h2>
					<p:selectOneMenu id="voli" value="#{pacchettoBean.nuovoPacchetto.volo}" var="v" converter="#{converterBean}">
						
						<f:selectItem itemLabel="Seleziona Volo andata" itemValue=""></f:selectItem>
						<f:selectItems value="#{prodottoBaseBean.voliDTO}" var="voli" itemLabel="#{voli.compagnia}" itemValue="#{voli}"></f:selectItems>
				
							<p:column>
								#{v.aeroportoPartenza}
							</p:column>
							<p:column>
								#{v.aeroportoArrivo}
							</p:column>
							<p:column>
								#{v.compagnia}
							</p:column>
					
					</p:selectOneMenu>
		<!-- 
					<p:selectOneMenu id="voli2" value="" var="v" converter="#{converterBean}">
						
						<f:selectItem itemLabel="Seleziona Volo ritorno" itemValue=""></f:selectItem>
						<f:selectItems value="#{prodottoBaseBean.voliDTO}" var="voli" itemLabel="#{voli.compagnia}" itemValue="#{voli}"></f:selectItems>
				
							<p:column>
								#{v.aeroportoPartenza}
							</p:column>
							<p:column>
								#{v.aeroportoArrivo}
							</p:column>
							<p:column>
								#{v.compagnia}
							</p:column>
					
					</p:selectOneMenu>
        -->
					<h2></h2>
					<p:selectOneMenu id="escursioni" value="#{pacchettoBean.nuovoPacchetto.escursione}" var="e" converter="#{converterBean}">
						
						<f:selectItem itemLabel="Seleziona Escursione" itemValue=""></f:selectItem>
						<f:selectItems value="#{prodottoBaseBean.escursioniDTO}" var="escursioni" itemLabel="#{escursioni.nome}" itemValue="#{escursioni}"></f:selectItems>
				
							<p:column>
								#{e.descrizione}
							</p:column>
					
					</p:selectOneMenu>
					
					
       				<h2></h2>
       				<p:commandButton value="CONFERMA" 
       					action="#{pacchettoBean.salvaPers()}" />
				</p:panel>
			</h:form>
			
		</div>
		
    </h:body>
</html>
